//
//  LoginRuleViewController.m
//  智积分
//
//  Created by apple on 2018/3/28.
//  Copyright © 2018年 Cynic. All rights reserved.
//

#import "LoginRuleViewController.h"
#import <WebKit/WebKit.h>
@interface LoginRuleViewController ()

@end

@implementation LoginRuleViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self viewLoad];
    // Do any additional setup after loading the view.
}

-(void)viewLoad{
    [self setNavigationViewWithTitle:@"用户使用协议" WithCanPop:YES WithPopData:@"return" WithPopisString:NO WithHasRightOperation:NO WithrightOperationData:@"" WithRightisString:YES WithNavigationColor:[UIColor clearColor] withBgView:self.view];
    
    CAGradientLayer *layer = [CAGradientLayer layer];
    layer.frame = self.navigationView.bounds;
    layer.colors = @[(id)[CXSinglerModel colorWithHex:@"#FF7F5A" alpha:1].CGColor,(id)[CXSinglerModel colorWithHex:@"#FE4438" alpha:1].CGColor];
    layer.startPoint = CGPointMake(0, 0);
    layer.endPoint = CGPointMake(1, 0);
    [self.navigationView.layer addSublayer:layer];
    [self.navigationView bringSubviewToFront:self.centerTitle];
    [self.navigationView bringSubviewToFront:self.popButton];
    
    [self webLoad];
}

-(void)webLoad{
    WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, cxsingler.topdis + 44 , cx_wid, cx_hit - cxsingler.topdis - cxsingler.bottomdis  - 44)];
    webView.backgroundColor = [[UIColor lightGrayColor] colorWithAlphaComponent:0.5];
    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:loginrule]]];
    [self.view addSubview:webView];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
